package loengud.yheksas;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Kinnitaja extends JFrame {
	
	public Kinnitaja() {
		getContentPane().setLayout(new BorderLayout());
		
		JLabel label = new JLabel("           Kindel v?");
		getContentPane().add(label, BorderLayout.NORTH);
		
		JButton okButton = new JButton("OK");
		okButton.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		}); // -okButton
		
		JButton noButton = new JButton("NO");
		noButton.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
			}
		}); // -noButton
		
		JPanel southPanel = new JPanel(new FlowLayout());
		southPanel.add(okButton);
		southPanel.add(noButton);
		
		getContentPane().add(southPanel, BorderLayout.SOUTH);
		
		pack();
	} // -Kinnitaja

}
